package com.pzhu.gmall.manage.controller;

import java.util.List;

import com.pzhu.gmall.bean.PmsProductSaleAttr;
import com.pzhu.gmall.service.SaleAttributeService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 刘鹏 liupeng
 * @date 2019/11/1
 **/
@CrossOrigin
@RestController
@RequestMapping("/saleAttribute")
public class SaleAttributeController {
    @Reference
    private SaleAttributeService saleAttributeService;

    @GetMapping
    public List<PmsProductSaleAttr> spuSaleAttrList(String spuId) {
        return saleAttributeService.getPmsProductSaleAttrList(spuId);
    }
}
